package com.IO.Buffered01;

import java.io.*;

public class A02 {
    public static void main(String[] args) throws IOException {
        //1创建缓冲流对象
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("untitled\\aaa.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("untitled\\bbb.txt"));
        // 拷贝 一次多个字节
        byte[] bytes = new byte[1024];
        int b;
        while((b = bis.read(bytes)) != -1){
            bos.write(b);
        }
        // 释放资源
        bos.close();
        bis.close();
    }
}
